const path = require('path');
const webpack = require('webpack');

const config = {
  entry: path.resolve(__dirname, 'index.js'),
  output: {
    path: path.resolve(__dirname, 'dist'),
    clean: true,
  },
  module: {
    rules: [
      {
        test: /\.jsx?$/,
        use: 'babel-loader',
        include: [__dirname],
      },
    ],
  },
  mode: 'development', // development production

  plugins: [
    new webpack.DefinePlugin({
      a: '"alias a---b"',
      b: 'a',
      c: { c1: { c2: '22' } },
    }),
  ],
};

module.exports = config;
